package com.weishu.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.weishu.domain.TCwCheckBatch;
import com.weishu.mapper.TCwCheckBatchMapper;
import com.weishu.service.ITCwCheckBatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 对账批次Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-06
 */
@Service
public class TCwCheckBatchServiceImpl implements ITCwCheckBatchService
{
    @Autowired
    private TCwCheckBatchMapper tCwCheckBatchMapper;

    /**
     * 查询对账批次
     * 
     * @param id 对账批次主键
     * @return 对账批次
     */
    @Override
    public TCwCheckBatch selectTCwCheckBatchById(Long id)
    {
        return tCwCheckBatchMapper.selectTCwCheckBatchById(id);
    }

    /**
     * 查询对账批次列表
     * 
     * @param tCwCheckBatch 对账批次
     * @return 对账批次
     */
    @Override
    public List<TCwCheckBatch> selectTCwCheckBatchList(TCwCheckBatch tCwCheckBatch)
    {
        return tCwCheckBatchMapper.selectTCwCheckBatchList(tCwCheckBatch);
    }

    /**
     * 新增对账批次
     * 
     * @param tCwCheckBatch 对账批次
     * @return 结果
     */
    @Override
    public int insertTCwCheckBatch(TCwCheckBatch tCwCheckBatch)
    {
        tCwCheckBatch.setCreateTime(DateUtils.getNowDate());
        return tCwCheckBatchMapper.insertTCwCheckBatch(tCwCheckBatch);
    }

    /**
     * 修改对账批次
     * 
     * @param tCwCheckBatch 对账批次
     * @return 结果
     */
    @Override
    public int updateTCwCheckBatch(TCwCheckBatch tCwCheckBatch)
    {
        tCwCheckBatch.setUpdateTime(DateUtils.getNowDate());
        return tCwCheckBatchMapper.updateTCwCheckBatch(tCwCheckBatch);
    }

    /**
     * 批量删除对账批次
     * 
     * @param ids 需要删除的对账批次主键
     * @return 结果
     */
    @Override
    public int deleteTCwCheckBatchByIds(Long[] ids)
    {
        return tCwCheckBatchMapper.deleteTCwCheckBatchByIds(ids);
    }

    /**
     * 删除对账批次信息
     * 
     * @param id 对账批次主键
     * @return 结果
     */
    @Override
    public int deleteTCwCheckBatchById(Long id)
    {
        return tCwCheckBatchMapper.deleteTCwCheckBatchById(id);
    }

    @Override
    public TCwCheckBatch selectTCwCheckBatchForDate(TCwCheckBatch tCwCheckBatch) {
        return tCwCheckBatchMapper.selectTCwCheckBatchForDate(tCwCheckBatch);
    }

    @Override
    public int insertTCwCheckBatchByCron(TCwCheckBatch tCwCheckBatch) {
        return tCwCheckBatchMapper.insertTCwCheckBatchByCron(tCwCheckBatch);
    }
}
